package com.viu.technology.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//标注该类为Controller类
@RestController
@RequestMapping("/demo")
public class DemoController {

    //   /demo/hello这个请求路径只能使用Get请求
    @GetMapping("/hello")
    public String hello() {
        //返回字符串到流中，
        return "this is my first demo";
    }


}
